package com.oplink.webbase.common.config;

import org.springside.modules.utils.PropertiesLoader;

/**
 * 
 * <p>
 * Title: 读取资源映射文件
 * </p>
 * <p>
 * Description:
 * </p>
 * <p>
 * Copyright: Copyright (c) 2014
 * </p>
 * <p>
 * Company: Oplink Communications
 * </p>
 * 
 * @author
 ** @serialData 2014-5-22 上午10:17:27
 * @version 1.0
 */

public class WebResource {
	/**
	 * 属性文件加载对象
	 */
	private static PropertiesLoader propertiesLoader;

	/**
	 * 获取配置
	 */
	public static String getConfig(String key) {
		if (propertiesLoader == null) {
			propertiesLoader = new PropertiesLoader("res.properties");
		}
		try {
			return propertiesLoader.getProperty(key);
		} catch (Exception e) {
			System.err.println("Can't find the properties name of :" + key);
		}
		return null;
	}
}
